<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>删列造序</title>
</head>

<body>
  <script>
    var minDeletionSize = function (strs) {
      let res = 0;
      for (let j = 0; j < strs.length; j++) {
        for (let i = 1; i < strs.length; i++) {
          if (strs[i][j] < strs[i - 1][j]) {
            res++;
            break;
          }
        }
      }

      return res;
    };
    console.log(minDeletionSize(["zyx", "wvu", "tsr"]))

  </script>
</body>

</html>